home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 1.toast / pc / sample code / games / netsprockettest / proto.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-23  |  4.2 KB  |  142 lines

  1. /*
  2.     File:        Proto.h
  3.  
  4.     Contains:    xxx put contents here xxx
  5.  
  6.     Version:    xxx put version here xxx
  7.  
  8.     Copyright:    © 1998 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     File Ownership:
  11.  
  12.         DRI:                Chris De Salvo
  13.  
  14.         Other Contact:        Steve Bollinger
  15.  
  16.         Technology:            Apple Game Sprockets
  17.  
  18.     Writers:
  19.  
  20.         (cjd)    Chris De Salvo
  21.  
  22.     Change History (most recent first):
  23.  
  24.        <SP2>     9/25/98    cjd        Removing references to stuff that was in fooutils.c
  25. */
  26.  
  27. /*************************************************************************************
  28. #
  29. #        Proto.h
  30. #
  31. #        This file contains the prototypes for the apps procs and funcs
  32. #
  33. #        Author(s):     Michael Marinkovich
  34. #                    Apple Developer Technical Support
  35. #                    marink@apple.com
  36. #
  37. #        Modification History: 
  38. #
  39. #            2/10/96        MWM     Initial coding                     
  40. #
  41. #        Copyright © 1992-96 Apple Computer, Inc., All Rights Reserved
  42. #
  43. #
  44. #        You may incorporate this sample code into your applications without
  45. #        restriction, though the sample code has been provided "AS IS" and the
  46. #        responsibility for its operation is 100% yours.  However, what you are
  47. #        not permitted to do is to redistribute the source as "DSC Sample Code"
  48. #        after having made changes. If you're going to re-distribute the source,
  49. #        we require that you make it clear in the source that the code was
  50. #        descended from Apple Sample Code, but that you've made changes.
  51. #
  52. *************************************************************************************/
  53. #include <AppleEvents.h>
  54. #include "app.h"
  55.  
  56. #ifdef __cplusplus
  57. extern "C" {
  58. #endif
  59. //----------------------------------------------------------------------
  60. //
  61. //    Aevt
  62. //
  63. //----------------------------------------------------------------------
  64.  
  65. OSErr             AEInit(void);
  66. OSErr            AERemove(void);
  67. pascal OSErr    DoAEOpenApp(AppleEvent *event,AppleEvent reply,long refCon);
  68. pascal OSErr    DoAEQuitApp(AppleEvent *event,AppleEvent reply,long refCon);
  69. pascal OSErr    DoAEOpenDoc(AppleEvent *event,AppleEvent reply,long refCon);
  70. pascal OSErr    DoAEPrintDoc(AppleEvent *event,AppleEvent reply,long refCon);
  71. OSErr             GotAEParams(AppleEvent *appleEvent);
  72.  
  73.  
  74. //----------------------------------------------------------------------
  75. //
  76. //    Initialize
  77. //
  78. //----------------------------------------------------------------------
  79.  
  80. OSErr            Initialize(void);
  81. void            ToolBoxInit(void);
  82. void             CheckEnvironment(void);
  83. OSErr             InitApp(void);
  84. void             MenuSetup(void);
  85.  
  86.  
  87. //----------------------------------------------------------------------
  88. //
  89. //    Main
  90. //
  91. //----------------------------------------------------------------------
  92.  
  93.  
  94. void             HandleError(short errNo,Boolean fatal);
  95. void             HandleAlert(short alertID);
  96.  
  97.  
  98. //----------------------------------------------------------------------
  99. //
  100. //    Events
  101. //
  102. //----------------------------------------------------------------------
  103.  
  104. void            EventLoop(void);
  105. short             MyGetSleep(void);
  106. void             CustomWindowEvent(short eventType,WindowRef window,void *refCon);
  107. void             DoEvent(EventRecord *event);
  108. void             DoIdle(WindowRef window, void *refCon);
  109. void             HandleMouseDown(EventRecord *event);
  110. void             HandleMenuChoice(WindowRef window, void *refCon);
  111. void             AdjustMainMenus(void);
  112. void            HandleContentClick(WindowRef window, void *refCon);
  113. void             HandleZoomClick(WindowRef window, void *refCon);
  114. void             HandleGrow(WindowRef window, void *refCon);
  115. void             UpdateWindow(WindowRef window);
  116. void             DoActivate(WindowRef window, void *refCon);
  117.  
  118.  
  119. //----------------------------------------------------------------------
  120. //
  121. //    Windows
  122. //
  123. //----------------------------------------------------------------------
  124.  
  125. WindowPtr         CreateWindow(short resID, void *wStorage, Rect *bounds, Str255 title,
  126.                             Boolean visible, short procID,short kind, WindowRef behind,
  127.                             Boolean goAwayFlag,long refCon);
  128. OSErr             RemoveWindow(WindowRef window);
  129. void             DisposeWindowStructure(DocHnd doc);
  130. void             NewWindowTitle(WindowRef window, Str255 str);
  131. OSErr             InitWindowProcs(WindowRef window, short windKind);
  132. void            DrawWindow( WindowRef window, void *refCon );
  133. void             DrawAboutWindow( WindowRef window, void *refCon );
  134. void             DoResizeWindow (WindowRef window);
  135. short             GetWindKind(WindowRef window);
  136. Boolean            GetIsAppWindow(WindowRef window);
  137. Boolean         GetIsAboutWindow( WindowRef window );
  138.  
  139. #ifdef __cplusplus
  140. }
  141. #endif
  142.